package com.deer.wms.base.system.service.factory.impl;

import com.deer.wms.base.system.dao.factory.FactoryMapper;
import com.deer.wms.base.system.model.factory.Factory;
import com.deer.wms.base.system.service.factory.FactoryService;
import com.deer.wms.common.core.service.AbstractService;
import com.deer.wms.common.core.text.Convert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class FactoryServiceImpl extends AbstractService<Factory,Integer> implements FactoryService {
    @Autowired
    private FactoryMapper factoryMapper;

    @Override
    public List<Factory> findList(Factory factory) {
        return factoryMapper.findList(factory);
    }

    @Override
    public int addFactory(Factory factory) {
        return factoryMapper.addFactory(factory);
    }

    @Override
    public Factory selectFactoryById(Integer factoryId) {
        return factoryMapper.selectFactoryById(factoryId);
    }

    @Override
    public int updateFactory(Factory factory) {
        return factoryMapper.updateFactory(factory);
    }

    @Override
    public int removeAll(String ids) {
        return factoryMapper.deleteAll(Convert.toStrArray(ids));
    }


}
